<%@ page import="com.dbb.OrderInfo" %>



<div class="fieldcontain ${hasErrors(bean: orderInfoInstance, field: 'buyer', 'error')} required">
	<label for="buyer">
		<g:message code="orderInfo.buyer.label" default="Buyer" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="buyer" name="buyer.id" from="${com.dbb.Contact.list()}" optionKey="id" required="" value="${orderInfoInstance?.buyer?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: orderInfoInstance, field: 'code', 'error')} ">
	<label for="code">
		<g:message code="orderInfo.code.label" default="Code" />
		
	</label>
	<g:textField name="code" value="${orderInfoInstance?.code}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: orderInfoInstance, field: 'contact', 'error')} required">
	<label for="contact">
		<g:message code="orderInfo.contact.label" default="Contact" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="contact" name="contact.id" from="${com.dbb.Contact.list()}" optionKey="id" required="" value="${orderInfoInstance?.contact?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: orderInfoInstance, field: 'deliveryDate', 'error')} required">
	<label for="deliveryDate">
		<g:message code="orderInfo.deliveryDate.label" default="Delivery Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="deliveryDate" precision="day"  value="${orderInfoInstance?.deliveryDate}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: orderInfoInstance, field: 'fromCity', 'error')} ">
	<label for="fromCity">
		<g:message code="orderInfo.fromCity.label" default="From City" />
		
	</label>
	<g:textField name="fromCity" value="${orderInfoInstance?.fromCity}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: orderInfoInstance, field: 'items', 'error')} ">
	<label for="items">
		<g:message code="orderInfo.items.label" default="Items" />
		
	</label>
	<g:select name="items" from="${com.dbb.Item.list()}" multiple="multiple" optionKey="id" size="5" value="${orderInfoInstance?.items*.id}" class="many-to-many"/>
</div>

<div class="fieldcontain ${hasErrors(bean: orderInfoInstance, field: 'orderDate', 'error')} required">
	<label for="orderDate">
		<g:message code="orderInfo.orderDate.label" default="Order Date" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="orderDate" precision="day"  value="${orderInfoInstance?.orderDate}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: orderInfoInstance, field: 'payment', 'error')} ">
	<label for="payment">
		<g:message code="orderInfo.payment.label" default="Payment" />
		
	</label>
	<g:textField name="payment" value="${orderInfoInstance?.payment}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: orderInfoInstance, field: 'supplier', 'error')} required">
	<label for="supplier">
		<g:message code="orderInfo.supplier.label" default="Supplier" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="supplier" name="supplier.id" from="${com.dbb.Contact.list()}" optionKey="id" required="" value="${orderInfoInstance?.supplier?.id}" class="many-to-one"/>
</div>

